package io;

import java.io.*;

/**
 *对象流:处理流/高级流
 * 1）ObjectInputStream和ObjectOutputSteam
 * 2）作用：进行对象的序列化和反序列化
 * 3）
 */
public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="张三";
        int age=25;
        String gender="男";
        String[] otherInfo={"是一名学生","黑龙江佳木斯的","喜欢打篮球","喜欢唱跳"};
        Student zs=new Student(name,age,gender,otherInfo);
        System.out.println(zs);
        FileOutputStream fos=new FileOutputStream("student.txt");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(zs);
        System.out.println("写出完毕");
        oos.close();
    }
}
